#ifndef __APP_LORA_H
#define __APP_LORA_H

#include <stdbool.h>

#define LORA_NODE_ADD 0X01
#define LORA_SEND_WAIT_TIME 1000
#define LORA_RECV_WAIT_TIME 1000

typedef struct 
{
    uint8_t add;
    uint8_t cmd;
    uint8_t len;
    uint8_t data[2];
    bool    need_ack;
}lora_send_pack_t;


void lora_init(void);
bool    lora_send(uint8_t *data,uint8_t datalen);
uint8_t lora_send_wait_replay(uint8_t* data,uint8_t datalen,uint8_t *recbuf,uint8_t buflen);

#endif
